package com.center.biz.impl;

import com.center.api.model.EduQuestionsComment;
import com.center.api.remote.RemoteEduQuestionsCommentService;
import com.center.biz.dao.EduQuestionsCommentMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduQuestionsCommentService.class)
public class RemoteEduQuestionsCommentServiceImpl implements RemoteEduQuestionsCommentService {

    @Autowired
    private EduQuestionsCommentMapper eduQuestionsCommentMapper;

    @Override
    public int save(EduQuestionsComment eduQuestionsComment) {
        return eduQuestionsCommentMapper.insertSelective(eduQuestionsComment);
    }

    @Override
    public int update(EduQuestionsComment eduQuestionsComment) {
        return eduQuestionsCommentMapper.updateByPrimaryKeySelective(eduQuestionsComment);
    }

    @Override
    public int delete(int id) {
        return eduQuestionsCommentMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduQuestionsComment> select(EduQuestionsComment eduQuestionsComment) {
        return null;
    }

    @Override
    public EduQuestionsComment getById(int id) {
        return eduQuestionsCommentMapper.selectByPrimaryKey(id);
    }
}
